Skip to content

Conversation

Lolotronop
Copy link
Contributor

fixes #1238
src/adapter/bun/compose.ts didn't account for routes that have a guard that requires query, thus leading to a bug. This PR adds a straightforward check for it, bypassing sucrose calls
While this works, I think(?) that it would be better to handle route validators (including standalone validators) inside sucrose if I understand the purpose of this function right, but as of now I can't think of a way to do it properly
Would love to hear SaltyAoms thought on it. Also there is a test included for this specific case

Copy link

pkg-pr-new bot commented Jun 21, 2025

Open in StackBlitz

npm i https://pkg.pr.new/elysiajs/elysia@1263

commit: 7251612

@SaltyAom SaltyAom merged commit 8e05e3f into elysiajs:main Jul 24, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error if guard validates query but route does not acces c.query property
2 participants